﻿//-----------------------------------------------------------------------------
// <copyright file="ICommonDialog.cs" company="William E. Kempf">
//     Copyright (c) William E. Kempf.
// </copyright>
//-----------------------------------------------------------------------------

namespace Onyx.Windows
{
    /// <summary>
    /// Defines a generalized class for for displaying common Win32 dialogs.
    /// </summary>
    public interface ICommonDialog
    {
        /// <summary>
        /// Gets or sets an object associated with the dialog. This provides
        /// the ability to attach an arbitrary object to the dialog.
        /// </summary>
        /// <value>A <see cref="System.Object"/> that is attached or associated
        /// with a dialog.</value>
        object Tag { get; set; }

        /// <summary>
        /// Displays a common dialog.
        /// </summary>
        /// <returns>If the user clicks the OK button of the dialog that is
        /// displayed, true is returned; otherwise, false.</returns>
        bool? ShowDialog();

        /// <summary>
        /// Resets the properties of a common dialog to their default values.
        /// </summary>
        void Reset();
    }
}
